package com.cc.service.impl;

import com.cc.entity.Products;
import com.cc.mapper.ProductsMapper;
import com.cc.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 33314
 * @version 1.0
 * @description: TODO
 * @date 2025/6/24 14:52
 */
@Service
public class ProductServiceImpl implements ProductService {
    @Autowired
    private ProductsMapper productsMapper;
    @Override
    public List<Products> getProductsList(String productName, String typeName) {
        return productsMapper.getProductsList(productName, typeName);
    }

    @Override
    public int insertProducts(Products products) {
        return productsMapper.insertProducts(products);
    }

    @Override
    public Products getProductsById(Integer productId) {
        return productsMapper.getProductsById(productId);
    }

    @Override
    public int updateProducts(Products products) {
        return productsMapper.updateProducts(products);
    }

    @Override
    public int deleteProductsById(Integer productId) {
        return productsMapper.deleteProductsById(productId);
    }
}
